import request from '@/utils/request'
import linq from 'linq'
export async function getMc(XXID,CJPC){
    //?$filter=REMOVE_FLAG eq 0
    
    let res =  await request({
        url: `/Mcs?$apply=filter(XXID eq '${XXID}' and CJPC eq '${CJPC}')`,
        method: 'get',
      })
    return res.data.value;
    //
    
}
export async function updateMc(model){
    let res =  await request({
        url: `/Mcs(${model.ID})`,
        method: 'put',
        data: model
      })
      
      return res.data;
}
export async function deleteMc(model){
  //
  model.remove_flag = 1
  let res =  await request({
    url: `/Mcs(${model.ID})`,
    method: 'put',
    data: model
  })
  
  return res.data;
}
export async function addMc(model){
   
   
    let res =  await request({
      url: '/Mcs',
      method: 'post',
      data: model,
    })
    
    return res.data;
}